const users = require('../controllers/user.server.controller');

module.exports = function (app) {
    app.route('/sign_up')
        .post(users.Signup);

    app.route('/sign_in')
        .post(users.Signin);

    app.route('/sign_out')
        .get(users.Signout);

    app.route('/users/:userId')
        .get(users.Introduce);

    app.route('/users/:userId/followers')
        .get(users.Lover);

    app.route('/users/:userId/followings')
        .get(users.Fan);

    app.route('/users/:userId/toggle_like')
        .get(users.requiresLogin,users.Toggle_like);
};